'''
Created on 2011/04/21

@author: yang_wanjun
'''
from django.conf.urls.defaults import patterns, url
from senbzblog.blog import views

urlpatterns = patterns('django.views.generic',
    url(r'^(?P<username>\w+)/$', views.show_blog_home, name='blog_home'),
    
    #article
    url(r'^(?P<username>\w+)/articles.html$', views.show_article_list, name='show_articles'),
    url(r'^(?P<username>\w+)/article/(?P<slug>\w+((-)*\w*)*).html$', views.show_article_detail, name='show_article'),
    url(r'^(?P<username>\w+)/(?P<year>\d{4})/(?P<month>\d{1,2})/$', views.show_article_month_list, name="show_article_month"),
    
    #category
    url(r'^(?P<username>\w+)/category/(?P<slug>\w+((-)*\w*)*).html$', views.show_category, name="show_category"),
    
    #comment
    url(r'^(?P<username>\w+)/(?P<slug>\w+((-)*\w*)*)/post-comment', views.post_comment, name="post_comment"),
    
    #tags
    url(r'(?P<username>\w+)/tag/(?P<id>\d+).html', views.show_tag, name="show_tag"),
    
#    #search
#    url(r'(?P<username>\w+)/search/results.html', views.search, name="search_result"),
    
    #page
    url(r'(?P<username>\w+)/(?P<slug>\w+((-)*\w*)*).html', views.show_page, name="show_page"),
    
)
